package cn.wolfcode.springboot_consumer._02_consumer_mode;

import org.apache.rocketmq.spring.annotation.MessageModel;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;


@Component
@RocketMQMessageListener(
        consumerGroup = "boot-consumer-demo",
        topic = "boot-consumer-mode",
        messageModel = MessageModel.BROADCASTING
)
public class Consumer2 implements RocketMQListener<String> {

    @Override
    public void onMessage(String msg) {
        System.out.println("消费者2信息"+msg);
    }
}


